/**
 * Created by x on 17-8-28.
 */
angular.module('tribalc').service(
    'welfareModel',
    [function () {
        var welfareModel = function (object) {

            var self = this;

            init();

            function init() {
                if (object) {
                    self.password = object ? object.password : null;
                    self.payChannel = object ? object.payChannel : null;
                    self.note = object ? object.note : null;
                    self.welfare = object ? object.welfare : [];
                    self.totalFee = object ? object.totalFee : null;
                }
            }
        };


        welfareModel.prototype.getObject = function () {
            return {
                password: this.password,
                payChannel: this.payChannel,
                note: this.note,
                welfare: this.welfare,
                totalFee:this.totalFee
            }
        };

        return welfareModel;

    }]
);
